-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(hesai): software-based precise FoV limit & early publishing #173
Conversation
3a37151
to
178d92d
Compare
6e61e50
to
9e72d84
Compare
…an cutting The new scan cutting mechanism filters points based on the corrected angle. This changes the points contained/filtered out at the edges of the scan cut.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was tested with 40P with the following issue:
- Setting cut angle out side of the range of FoV start and end, resulted in no error and also pointcloud output.
- Even if that was the case and the "cut" happens in the area outside of the FoV (which is kind of uneccesary but logically possible) and the actual observed point cloud is correct in terms of min and max angles.
- Example: cut 10, min 180, max 360: no warnings, output pointcloud is full 180 degree segment.
.../include/nebula_decoders/nebula_decoders_hesai/decoders/angle_corrector_correction_based.hpp
Outdated
Show resolved
Hide resolved
.../include/nebula_decoders/nebula_decoders_hesai/decoders/angle_corrector_correction_based.hpp
Outdated
Show resolved
Hide resolved
.../include/nebula_decoders/nebula_decoders_hesai/decoders/angle_corrector_correction_based.hpp
Outdated
Show resolved
Hide resolved
.../include/nebula_decoders/nebula_decoders_hesai/decoders/angle_corrector_correction_based.hpp
Outdated
Show resolved
Hide resolved
Co-authored-by: David Wong <33114676+drwnz@users.noreply.github.com>
@drwnz Thank you for the review! I have addressed your comments and re-tested setting the
The fix is in this commit: 2e42bd0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a few more comments, nothing urgent.
I haven't gone through the tests except for verifying that they passed.
.../include/nebula_decoders/nebula_decoders_hesai/decoders/angle_corrector_correction_based.hpp
Outdated
Show resolved
Hide resolved
nebula_decoders/include/nebula_decoders/nebula_decoders_hesai/decoders/hesai_decoder.hpp
Outdated
Show resolved
Hide resolved
nebula_decoders/include/nebula_decoders/nebula_decoders_hesai/decoders/hesai_decoder.hpp
Show resolved
Hide resolved
...hw_interfaces/include/nebula_hw_interfaces/nebula_hw_interfaces_hesai/hesai_hw_interface.hpp
Outdated
Show resolved
Hide resolved
nebula_hw_interfaces/src/nebula_hesai_hw_interfaces/hesai_hw_interface.cpp
Outdated
Show resolved
Hide resolved
… add doc comments
Co-authored-by: David Wong <33114676+drwnz@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ready to go, great work!
PR Type
Description
This PR introduces software-based FoV limits and early publishing for Hesai sensors.
Software-based FoV
Previously, configuring
cloud_min_angle
andcloud_max_angle
would set the sensor's hardware filter to those values.However, the hardware filter is using raw azimuths.
This lead to the scan having jagged edges (points missing in some channels, too many points in others).
For certain models, this affected areas of up to ~10deg on both edges of the FoV.
This PR improves upon this in the following way:
cloud_min_angle
andcloud_max_angle
to the exact FoV they want the output pointcloud to havesetup_sensor == false
)Early publishing
Previously, a scan was published once the packet after it was received. This was done because this made the scan completion check easier (could compare 2 azimuths according to some scan completion criterion).
For scans of 360deg, this is not a problem, as there is no time gap between the end of one scan and the beginning of the next.
However, for FoVs < 360deg, this approach increases latency unnecessarily: for an FoV of 180deg and 1 full rotation every 100ms, the additional latency of the finished pointcloud just "sitting there" is 50ms.
This PR improves upon this in the following way:
Other
For testing this PR with AT128, I had to fix the LidarRange issue:
This was done by checking the sensor model before sending the LidarRange command.
Review Procedure
Check for the following FoVs
if the pointcloud in Rviz has clean edges at those angles for a 360 deg sensor such as OT128.
Check AT128 in the same way but with FoVs inside [30; 150].
Remarks
These two improvements have been combined into one PR as they are closely related and would require extra work to function independently.
Pre-Review Checklist for the PR Author
PR Author should check the checkboxes below when creating the PR.
Checklist for the PR Reviewer
Reviewers should check the checkboxes below before approval.
Post-Review Checklist for the PR Author
PR Author should check the checkboxes below before merging.
CI Checks